From 768e6a45796aec32bbc2119e5742ac2332b1c084 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 4 Mar 2015 20:35:09 -0500 Subject: [PATCH] Ensure print-related types are registered These types are not covered by g_test_register_all_types, and having the types registered when a print dialog is used helps in cases where GTK+ is dlopened. https://bugzilla.gnome.org/show_bug.cgi?id=745065 --- gtk/gtkprintunixdialog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 06cb4b6fe6..e1c19bc6e9 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -726,6 +726,11 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog) priv->support_selection = FALSE; priv->has_selection = FALSE; + g_type_ensure (GTK_TYPE_PRINTER); + g_type_ensure (GTK_TYPE_PRINTER_OPTION); + g_type_ensure (GTK_TYPE_PRINTER_OPTION_SET); + g_type_ensure (GTK_TYPE_PRINTER_OPTION_WIDGET); + gtk_widget_init_template (GTK_WIDGET (dialog)); gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (dialog)); gtk_dialog_add_buttons (GTK_DIALOG (dialog), @@ -737,7 +742,7 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog) widget = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_widget_set_sensitive (widget, FALSE); - /* Treeview auxilary functions need to be setup here */ + /* Treeview auxiliary functions need to be setup here */ gtk_tree_model_filter_set_visible_func (priv->printer_list_filter, (GtkTreeModelFilterVisibleFunc) is_printer_active, dialog, -- 2.30.2